Azure Overview

Azure is a cloud platform owned by Microsoft that offers a variety of online resources. TerraMax has a single Azure account, which uses the same Tenant ID as the TerraMax Microsoft 365 account (which supplies resources like Word, Excel and SharePoint). This means that both the Azure and Microsoft 365 accounts are part of the same organization, share access to user identities and security settings, and are both managed through Microsoft Entra ID.

This project uses Azure to host several components in a secure and centralized way, allowing them to share the same Entra security infrastructure.

Azure components diagram

Azure Portal

The online Azure Portal gives you an overview of the Azure account.

Each individual component that’s hosted in Azure can viewed in the Portal, and most management tasks (changing settings, updating environmental variables, checking usage and error logs, etc) can be done here as well.

Entra ID is accessed through the Portal, which lets you view and manage the app registrations, which are separate objects associated with their respective apps that contain information about identity and permissions.

There is also a Cost Management tool in The Portal which lets you check costs, create budgets, and set warnings for if costs are likely to exceed budget.


Project Components

Core components of this project include:

  • Ordering App (terramax-ordering-app): a user-facing web app that users can directly interact with to submit and manage Deals in HubSpot.
    • Hosted in Azure Static Web Apps
    • Written in React + Typescript
    • Uses Microsoft Entra ID authentication via MSAL, allowing only TerraMax users to log in
  • Product Manager App (product-manager): a user-facing web app that allows users to quickly look up products and product data, and to create custom Price List PFDs.
    • Hosted in Azure Static Web Apps
    • Written in React + Typescript
    • Uses Microsoft Entra ID authentication via MSAL, allowing only TerraMax users to log in
  • HubSpot Service (terramax-hubspot-service): a backend app that connects the Ordering App to both an internal product database, and HubSpot’s records of customers and sales.
    • Hosted in Azure Functions
    • Written in Typescript
    • Uses the HubSpot api to access HubSpot data, and a connection string to access the Azure SQL database
    • Uses Microsoft Entra ID to validate incoming requests and restrict access to approved applications
    • Accessed through the Progressive Web App clients, not directly by the user
  • PDF Service (pdf-service): a containerized backend app that recieves html documents and converts them to PDFs.
    • Hosted in Azure Container Apps
    • Written in TypeScript
    • Uses Puppeteer to run a headless Chromium browser, and Sharp to compress images
    • Accessed only through the HubSpot Service app, not directly by the client
  • TerraMax Data (terramax-data): a SQL database that holds the masterlist of product information, and a log of transactions that have passed through the server app.
    • Hosted in Azure SQL database
    • Accessed only through the HubSpot Service app, not directly by the client
  • TerraMax App Images (terramaxappimages): and Azure storage account that stores images for use in other components.
    • Hosted in **
    • Accessed only through the HubSpot Service app, not directly by the client

Other relevant resources:

  • terramax-hubspot-service-app-insights
    • Application Insights instance connected to the terramax-hubspot-serviceFunction App, which logs data about the app’s use.
  • terramax-db-server
    • Logical SQL Server that contains the terramax-data database. Azure requires a server to exist, even if it only hosts a single DB.
  • TestResourceGroup
    • The main Resource Group that contains all parts of the project in Azure. The name comes from its origin during the beginning phase of the project, but to rename and restructure would require recreating resources.
  • ASP-TestResourceGroup-9ed2
    • The App Service Plan associated with the Function App terramax-hubspot-service. It defines the underlying compute environment, and was auto-generated (and named) by Azure.
  • testresourcegroup8e0c
    • The storage account automatically created to support the Function App terramax-hubspot-service, used for things like
  • ordering-app_group
    • An organizational group that Azure auto-generated, not structurally important. It overlaps imperfectly with the TestResourceGroup